home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
demos
/
GL
/
ideas
/
h.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
4KB
|
170 lines
/*
* Copyright 1992, 1993, 1994, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <gl.h>
float h_data[][2] = {
{1.462963, 17.499485-3.0},
{3.259259, 17.851700-3.0},
{2.074074, 17.351185-3.0},
{3.037037, 17.073120-3.0},
{2.277778, 17.054583-3.0},
{2.814815, 15.775489-3.0},
{2.018518, 14.737384-3.0},
{2.203704, 12.142121-3.0},
{1.296296, 10.158600-3.0},
{1.259259, 7.674562-3.0},
{0.666667, 6.933059-3.0},
{0.685185, 5.728116-3.0},
{0.314815, 5.653965-3.0},
{0.444444, 5.227601-3.0},
{0.074074, 5.097837-3.0},
{1.611111, 9.824923-3.0},
{1.333333, 8.527291-3.0},
{2.240741, 10.937179-3.0},
{2.500000, 10.992791-3.0},
{2.888889, 11.771370-3.0},
{3.314815, 11.845520-3.0},
{3.462963, 12.253347-3.0},
{3.740741, 12.067971-3.0},
{4.500000, 12.846550-3.0},
{4.148148, 12.030896-3.0},
{5.185185, 12.883625-3.0},
{4.296296, 11.771370-3.0},
{5.351852, 12.420185-3.0},
{4.333333, 11.196705-3.0},
{5.129630, 10.955716-3.0},
{4.129630, 9.583934-3.0},
{4.203704, 7.192585-3.0},
{3.518518, 6.414006-3.0},
{4.129630, 6.469619-3.0},
{3.537037, 5.765191-3.0},
{4.296296, 6.061792-3.0},
{3.851852, 5.171988-3.0},
{4.722222, 5.802266-3.0},
{4.277778, 5.060762-3.0},
{5.314815, 5.894954-3.0},
{5.148148, 5.431514-3.0},
{5.777778, 6.098867-3.0},
};
draw_h() {
bgntmesh();
v2f(h_data[0]);
v2f(h_data[1]);
v2f(h_data[2]);
v2f(h_data[3]);
v2f(h_data[4]);
v2f(h_data[5]);
v2f(h_data[6]);
v2f(h_data[7]);
v2f(h_data[8]);
v2f(h_data[9]);
v2f(h_data[10]);
v2f(h_data[11]);
v2f(h_data[12]);
v2f(h_data[13]);
v2f(h_data[14]);
endtmesh();
bgntmesh();
v2f(h_data[15]);
v2f(h_data[16]);
v2f(h_data[17]);
v2f(h_data[18]);
v2f(h_data[19]);
v2f(h_data[20]);
v2f(h_data[21]);
v2f(h_data[22]);
v2f(h_data[23]);
v2f(h_data[24]);
v2f(h_data[25]);
v2f(h_data[26]);
v2f(h_data[27]);
v2f(h_data[28]);
v2f(h_data[29]);
v2f(h_data[30]);
v2f(h_data[31]);
v2f(h_data[32]);
v2f(h_data[33]);
v2f(h_data[34]);
v2f(h_data[35]);
v2f(h_data[36]);
v2f(h_data[37]);
v2f(h_data[38]);
v2f(h_data[39]);
v2f(h_data[40]);
v2f(h_data[41]);
endtmesh();
bgnline();
v2f(h_data[0]);
v2f(h_data[2]);
v2f(h_data[4]);
v2f(h_data[6]);
v2f(h_data[8]);
v2f(h_data[10]);
v2f(h_data[12]);
v2f(h_data[14]);
v2f(h_data[13]);
v2f(h_data[11]);
v2f(h_data[9]);
v2f(h_data[7]);
v2f(h_data[5]);
v2f(h_data[3]);
v2f(h_data[1]);
v2f(h_data[0]);
endline();
bgnline();
v2f(h_data[15]);
v2f(h_data[17]);
v2f(h_data[19]);
v2f(h_data[21]);
v2f(h_data[23]);
v2f(h_data[25]);
v2f(h_data[27]);
v2f(h_data[29]);
v2f(h_data[31]);
v2f(h_data[33]);
v2f(h_data[35]);
v2f(h_data[37]);
v2f(h_data[39]);
v2f(h_data[41]);
v2f(h_data[40]);
v2f(h_data[38]);
v2f(h_data[36]);
v2f(h_data[34]);
v2f(h_data[32]);
v2f(h_data[30]);
v2f(h_data[28]);
v2f(h_data[26]);
v2f(h_data[24]);
v2f(h_data[22]);
v2f(h_data[20]);
v2f(h_data[18]);
v2f(h_data[16]);
v2f(h_data[15]);
endline();
}